<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title></title>
		<link rel="stylesheet" type="text/css" href="../css/aui.css" />
		<style type="text/css">
		
			.aui-col-xs-4 p {
			    width: 40px!important;
			    height: 40px!important;
			}
			.aui-col-xs-4 p {
			    width: 42px;
			    height: 42px;
			    display: -webkit-box;
			    -webkit-box-orient: horizontal;
			    -webkit-box-pack: center;
			    -webkit-box-align: center;
			    display: box;
			    box-orient: horizontal;
			    box-pack: center;
			    box-align: center;
			    /* border-radius: 10px; */
			    -webkit-border-radius: 20px;
			    margin: 0 auto;
			}
			
			.aui-bg-ffc74e {
			    background: #ffc74e;
			}
			
			
			.aui-col-xs-4 p i {
			    color: #fff!important;
			    font-size: 20px!important;
			}
		</style>
	</head>
	<body>
<section class="aui-content aui-margin-b-10">
			<div class="aui-grid">
				<div class="aui-row">
					<div class="aui-col-xs-4"  onclick="openFrm('frame_notice','通知')" id='frame_notice'>
						<p class="aui-bg-ffc74e">
							<i class="aui-iconfont aui-icon-my aui-text-info"></i>
						</p>
						<div class="aui-grid-label">
							通知
						</div>
					</div>
					<div class="aui-col-xs-4" onclick="openFrm('frame_weekly','汇报')">
						<p class="aui-bg-ffc74e" style=" background: #8BC34A; ">
							<i class="aui-iconfont aui-icon-mobile"></i>
						</p>
						<div class="aui-grid-label">
							汇报
						</div>
					</div>
					
					<div class="aui-col-xs-4" onclick="openFrm('frame_clock','打卡')">
						<p class="aui-bg-ffc74e"  style=" background: #cddc39; ">
							<i class="aui-iconfont aui-icon-cert"></i>
						</p>
						<div class="aui-grid-label">
							打卡
						</div>
					</div>
					
					
					<div class="aui-col-xs-4" onclick="openFrm('frame_chart','销售图表')">
						<p class="aui-bg-ffc74e" style=" background: #2196f3; ">
							<i class="aui-iconfont aui-icon-map"></i>
						</p>
						<div class="aui-grid-label">
							销售图表
						</div>
					</div>
					
					<div class="aui-col-xs-4"  onclick="openFrm('frame_product','产品')">
						<p class="aui-bg-ffc74e"  style=" background: #ff5722; ">
							<i class="aui-iconfont aui-icon-share"></i>
						</p>
						<div class="aui-grid-label">
							产品
						</div>
					</div>
					
					<div class="aui-col-xs-4" onclick="openFrm('frame_record','员工')" id="myEmployee" style="display: none;">
						<p class="aui-bg-ffc74e"  style=" background:00bcd4">
							<i class="aui-iconfont aui-icon-edit"></i>
						</p>
						<div class="aui-grid-label">
							我的员工
						</div>
					</div>
					
				</div>
			</div>
		</section>
		
		
		<section class="aui-content aui-margin-b-10">
			<div class="aui-grid">
				<div class="aui-row">
					<div class="aui-col-xs-4" onclick="openFrm('frame_chance','机会')">
						<p class="aui-bg-ffc74e"  style=" background: #00bcd4; ">
							<i class="aui-iconfont aui-icon-gear"></i>
						</p>
						<div class="aui-grid-label">
							机会
						</div>
					</div>
					
					<div class="aui-col-xs-4" onclick="openFrm('frame_market','市场活动')">
						<p class="aui-bg-ffc74e"  style=" background: #009688; ">
							<i class="aui-iconfont aui-icon-calendar"></i>
						</p>
						<div class="aui-grid-label">
							市场活动
						</div>
					</div>

					
					<div class="aui-col-xs-4" onclick="openFrm('frame_phonebook','员工通讯录')">
						<p class="aui-bg-ffc74e"  style=" background: #cddc39; ">
							<i class="aui-iconfont aui-icon-location"></i>
						</p>
						<div class="aui-grid-label">
							员工通讯录
						</div>
					</div>
					
					<div class="aui-col-xs-4" onclick="openFrm('frame_plan','行程')">
						<p class="aui-bg-ffc74e"  style=" background: #6f82ec; ">
							<i class="aui-iconfont aui-icon-share"></i>
						</p>
						<div class="aui-grid-label">
							行程
						</div>
					</div>
					
					<div class="aui-col-xs-4"  onclick="openFrm('frame_gonghaichi','公海池')">
						<p class="aui-bg-ffc74e"  style=" background: #039be5; ">
							<i class="aui-iconfont aui-icon-video"></i>
						</p>
						<div class="aui-grid-label">
							公海池
						</div>
					</div>
					
					<div class="aui-col-xs-4" onclick="openFrm('frame_card','我的名片')">
						<p class="aui-bg-ffc74e"  style=" background: #ff2600; ">
							<i class="aui-iconfont aui-icon-cert"></i>
						</p>
						<div class="aui-grid-label">
							我的名片
						</div>
					</div>
					
				</div>
			</div>
		</section>
	</body>
	<script type="text/javascript" src="../js/jquery.min.js"></script>
	<script type="text/javascript">
	var _menu=[];
	(function() {
	<c:forEach items="${menu}" var="item">
		var item={id:${item.id}, name:"${item.name}", isStart:"${item.isStart}", childMenus:[]};
		<c:forEach items="${item.childMenus }" var="subItem">
			var subItem={id:${subItem.id}, name:"${subItem.name}", isStart:"${subItem.isStart}"};
			_menu.push(subItem);
		</c:forEach>
		_menu.push(item);
	</c:forEach>
	})();
</script>
	<script type="text/javascript">
	
		$(function() {
			loadEmployee();
		});
	
	
		function loadEmployee() {
			var isStart = false;
			var menu =_menu;
			/* console.log("menu.length="+menu.length); */
			for (var i = 0; i < menu.length; i++) {
				/* console.log(menu[i].isStart+":"+menu[i].id); */
				if (menu[i].isStart == 1 && menu[i].id == 73) {
						isStart = true;
					}
			}
			if(isStart){
				$("#myEmployee").show();
			}
			/* $.ajax({
				url : '${pageContext.request.contextPath}/wap/menu.do',
				type : "POST",
				dataType : "json",
				success : function(data) {
					if(data.isStart){
						$("#myEmployee").show();
					}
				}
			}); */
		}
	</script>
</html>